package cn.chrisx.drad.core;

/**
 * @author Jzfox <jz_boy@163.com>
 * @version 1.0
 * @date 2018/9/25 15:01
 * @description
 * @copyright ©2018 www.jzfox.net All rights reserved.
 */
public class DrAdError {

    /**
     * 参见第三方错误
     */
    public static final int ERROR_THIRD = -1;

    /**
     * 广告在有效期内
     */
    public static final int ERROR_VALID = 0x21;

    /**
     * 无填充
     */
    public static final int ERROR_NO_FILL = 0x22;

    /**
     * 请求中
     */
    public static final int ERROR_REQUEST = 0x23;

    /**
     * 未配置任何平台
     */
    public static final int ERROR_NO_CONFIG = 0x24;

    /**
     * 后台配置是debug 模式下，而客户端为线上
     */
    public static final int ERROR_DEBUG = 0x25;

    /**
     * 不支持的平台
     */
    public static final int ERROR_NOT_SUPPORT = 0x26;


    /**
     * 没有配置相关平台
     */
    public static final int ERROR_NOT_CONFIG = 0x27;


    // 错误码
    private int errorCode;

    private String errorMsg;

    private String platformName;

    private Object extra;

    /**
     * 第三方广告错误码
     *
     * @return 广告错误码
     */
    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }


    public DrAdError() {
    }

    public DrAdError(String platformName, int errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.platformName = platformName;
    }

    public String getPlatformName() {
        return platformName;
    }

    public void setPlatformName(String platformName) {
        this.platformName = platformName;
    }

    public Object getExtra() {
        return extra;
    }

    public void setExtra(Object extra) {
        this.extra = extra;
    }
}
